﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using GPCSC.Webs;

namespace HSYCWeb.web.DOCS
{
    public partial class admSH : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                f_load();
            }
        }
        /// <summary>
        /// 加载数据
        /// </summary>
        protected void f_load()
        {
            Hashtable htable = new Hashtable();
            DataSet ds = new DataSet();
            ds = new SqlReadXml().ReaderDataSet("sel_user_yz",htable);
            Repeater1.DataSource = ds;
            Repeater1.DataBind();
            this.pageinfo.InnerHtml = new FYpage().GetPageNum(ds.Tables[0], Repeater1, 10);
            
        }

        protected void deluser( string userid)
        {
            Hashtable htable = new Hashtable();
            htable.Add("IsDel",1);
            GPCSC.Webs.databyhtable dtable = new GPCSC.Webs.databyhtable();
            dtable.databyhtables(htable, "update", "GJRC", "RCID", userid);

        }

        protected void LCall_Callback(object sender, NickLee.Web.UI.CallBackEventArgs e)
        {
            try
            {
                string type = e.Parameters[0].ToString();
                //删除
                if (type == "1")
                {
                    string userid = e.Parameters[1].ToString();
                    deluser(userid);
                    f_load();
                }
            }
            catch (Exception ee)
            {
                throw ee;
            }
            finally
            {
                Panel1.RenderControl(e.Output);
            }
        }
    }
}